@extends('admin.public.father')
@section('content')
    {{--判断，session值里是否有错误消息，有就进入--}}
    @if ($errors->any())
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <form action="{{route('regist')}}" method="post">
        @csrf
        <div class="card">
            <div class="card-header">用户注册</div>
            <div class="card-body">
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-default">注册昵称：</span>
                    </div>
                    <input type="text" name="username" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="请输入昵称">
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-default">邮箱账号：</span>
                    </div>
                    <input type="text" name="email" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="请输入邮箱账号">
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-default">初次密码：</span>
                    </div>
                    <input type="password" name="password" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="请输入初次密码">
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-default">确认密码：</span>
                    </div>
                    <input type="password" name="password_confirmation" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="请再次输入密码">
                </div>
                <button class="btn btn-primary btn-lg btn-block">注册</button>
            </div>
        </div>
    </form>
@endsection